package com.carleasoft.mps.cms.business.train.controller;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.carleasoft.mps.cms.business.train.bean.po.QueryTrainScoreByUserCodePo;
import com.carleasoft.mps.cms.business.train.service.TrainScoreService;
import com.carleasoft.mps.core.result.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

/**
 * <p>
 * 考核成绩登记表 前端控制器
 * </p>
 *
 * @author fan
 * @since 2023-05-17
 */
@RestController
@RequestMapping("/trainScore")
public class TrainScoreController {
    @Autowired
    private TrainScoreService trainScoreService;
    /**
     * 根据人员编码获取考核的成绩信息
     */
    @PostMapping("/queryTrainScoreByUserCode")
    public R<Page<HashMap<String,Object>>> queryTrainScoreByUserCode(@RequestBody QueryTrainScoreByUserCodePo queryTrainScoreByUserCodePo){
        return R.ok(trainScoreService.queryTrainScoreByUserCode(queryTrainScoreByUserCodePo));
    }
}

